<template>
    <div class="entrance">
      <head-top head-title="工作人员" go-back="true"></head-top>
     <!-- <mt-cell title="我的查验" is-link to="/my/MyCheck"></mt-cell>
      <mt-cell title="投票统计" is-link to="/my/statisticsAll"></mt-cell>
      <mt-cell title="房屋审核" is-link to="/my/HomeAudit"></mt-cell>
      <mt-cell title="扫码送票" is-link to="/my/Scan"></mt-cell>
      <mt-cell title="查验报价" is-link :to="{path:'/my/CheckOffer',query:{state:1}}"></mt-cell>
      <mt-cell title="跑楼审核" is-link to="/my/ExamineRun"></mt-cell>-->
      <div class="cell_li">
        <div class="SongList">
          <div class="covers" :style="{display:MinDisplay}">
            <div class="cover" v-for="(img,index) in imgs" :key='index' @click="toSrc(img.ad)">
              <img :src="img.src" width="50%" class="min" alt="">
              <div class="cover_text">{{img.title}}</div>
            </div>
          </div>
        </div>
      </div>
    </div>
</template>

<script>
  import headTop from '../header/Header'
  export default {
    name: 'Entrance',
    data () {
      return {
        display: 'none',
        MinDisplay: 'flex',
        imgs: [
          {'src': require('./images/work02@2x.png'),
            'ad': '/my/statisticsAll',
            'title': '投票统计'
          },
          {'src': require('./images/work03@2x.png'),
            'ad': '/my/HomeAudit',
            'title': '房屋审核'
          },
          {'src': require('./images/work06@2x.png'),
            'ad': '/my/ExamineRun',
            'title': '跑楼审核'
          },
          {'src': require('./images/work07@2x.png'),
            'ad': '/my/WorkTime',
            'title': '工时统计'
          },
          {'src': require('./images/work01@2x.png'),
            'ad': '/my/MyCheck',
            'title': '我的查验'
          },
          {'src': require('./images/work05@2x.png'),
            'ad': '/my/CheckOffer',
            'title': '查验报价'
          },
          {'src': require('./images/work04@2x.png'),
            'ad': '/my/Scan',
            'title': '扫码送票'
          }
        ]
      }
    },
    created () {},
    methods: {
      toSrc(src) {
        if (src === '/my/CheckOffer') {
          this.$router.push({
            path: src,
            query: {
              state: 1
            }
          })
        } else {
          this.$router.push({
            path: src
          })
        }
      }
    },
    components: {
      headTop
    }
  }
</script>

<style lang="scss" scoped>
.entrance{
  width: 100%;
  padding-top: 40px;
  .cell_li{
    padding: 10px;
    .SongList{
      width: 100%;
      .covers{
        display: flex;
        justify-content: space-between;
        flex-wrap: wrap;
        .cover{
          /*display: flex;*/
          display: block;
          justify-content: center;
          text-align: center;
          width: 30%;
          margin: 5px;
          box-shadow: 0 0 5px rgba(0,0,0,0.2);
          padding: 25px 0;
          border-radius: 10px;
          .cover_text{
            font-size: 15px;
            margin-top: 10px;
            color: #333333;
          }
        }
        .min{
          border-radius: 10px;
          cursor: zoom-in;
        }
      }
    }
  }
}
</style>
